﻿#include "Addresses.h"
#include "GameSettingsCoolection.h"

decltype(SettingT<GameSettingCollection>::pCollection) SettingT<GameSettingCollection>::pCollection(0x058F50B8);
RelocAddr <_GetSetting> GetSetting(0x01586734);
RelocAddr <_SettingUpdated> SettingUpdated (0x0314B7E4); // 29 314B7E4   23 314BB34

void qqSetting::SetDouble(double a_value)
{
    if(GetType() != kFloat) return;
    float tmp = data.f;
    data.f = static_cast<float>(a_value);
    if (tmp != a_value) Unk_02();
    SettingUpdated(this);    
}

void qqSetting::SetU32(u32 a_value)
{
    if(GetType() != kUInt) return;
    u32 tmp = data.u;
    data.u = a_value;
    if (tmp != a_value) Unk_02();
    SettingUpdated(this); 
}

void qqSetting::SetS32(s32 a_value)
{
    if(GetType() != kInt) return;
    s32 tmp = data.i;
    data.i = a_value;
    if (tmp != a_value) Unk_02();
    SettingUpdated(this); 
}